<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>除字符串内所有⾮英⽂字⺟字符</title>
</head>
<body>  
      <p>输入字符串<input type="text"id='strdate'></p>
      <button onclick="de()">去除掉</button>  
    <script>
        function de(){
				var str =document.getElementById('strdate').value//获得标签对象 获得输入框的字符串
				var reg =/[^u4eoo-u9fa5a-zA-Z]||0-9/g;
				var newstr =str.replace(reg,'');//将匹配出来的字符串替换为空
				alert(newstr)
			}

    </script>   
</body>
</html>